package com.bfly.mall.order.enums;

/**
 * 支付方式
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/17 21:46
 */
public enum PayTypeEnum {
    STORE(1, "到店付"),
    WECHAT(2, "微信"),
    ALIPAY(3, "支付宝");

    private int id;
    private String name;

    PayTypeEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static PayTypeEnum getStatus(int id) {
        for (PayTypeEnum status : PayTypeEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
